package com.action;

import com.opensymphony.xwork2.ModelDriven;
import com.model.User;
import com.model.Users;
import com.service.UserService;

public class UserAction implements ModelDriven<User> {
	
	private User user;
	private UserService userService;

	public void setUserService(UserService userService) {
		this.userService = userService;
	}
	public void setUser(User user) {
		this.user = user;
	}

	@Override
	public User getModel() {
		return user;
	}
	
	public String add(){
		userService.save(user);
		return "success";
	}

}
